﻿@using FFLTask.GLB.Global.Enum
@model FFLTask.SRV.ViewModel.Task.EditModel
@if (Model.CurrentUser.Id == Model.Publisher.Id)
{
    if (Model.CurrentStatus.Stage == (int)Status.Publish
        || Model.CurrentStatus.Stage == (int)Status.Assign
        || Model.CurrentStatus.Stage == (int)Status.Own
        || Model.CurrentStatus.Stage == (int)Status.Doubt
        || Model.CurrentStatus.Stage == (int)Status.Update
        || Model.CurrentStatus.Stage == (int)Status.Quit)
    {
        @Html.Partial("EditColumns/_Subtitle", TaskProcess.Publish, new ViewDataDictionary { { "Edit", true } })
        @Html.EditorFor(m => m.Publish, "_PublishEditable")
    }
    else
    {
        @Html.Partial("EditColumns/_Subtitle", TaskProcess.Publish)
        @Html.Partial("EditColumns/_PublishReadonly", Model)
    }
}
else
{
    @Html.Partial("EditColumns/_Subtitle", TaskProcess.Publish)
    @Html.Partial("EditColumns/_PublishReadonly", Model)
}
